/**
 * Copyright (C) 2009+ Spark Zheng
 *
 * @file        include/dlloader.h 
 * @date        2010-01-11
 * @brief
 * @see         dlib
 * @history
 */

#ifndef _DLIB_DLLOADER_H
#define _DLIB_DLLOADER_H

#ifdef __cplusplus
extern "C" {
#endif

#include <dlfcn.h>
#include "global.h"

typedef struct dlloader dlib_dlloader_t;

struct dlloader {
	void		*handler;
	char		soname[PATH_MAX];
};

extern dlib_dlloader_t *dlib_dlloader_init(const char *soname, int flag);

extern void *dlib_dlloader_symbol(dlib_dlloader_t *loader, const char *sym);

extern void dlib_dlloader_exit(dlib_dlloader_t *loader);


#ifdef __cplusplus
}
#endif
#endif
